﻿#include "CreateSystemAction.h"
#include "Application.h"

CreateSystemAction::CreateSystemAction(Application& app)
  : Action(app)
{
  _prefix = "Problem/";
}

void CreateSystemAction::Execute() {
  auto mesh = _app.GetMesh();
  if (mesh)
  {
    //_sys = std::make_shared<EulerSystem>(*_mesh);
    _app.GetSystem() = std::make_shared<NavierStokesSystem>(*mesh);
  }
  else
  {
    Error("Mesh还没建立");
  }
}
